package SA.teacher.daily;

import SA.teacher.*;
import SA.teacher.answer.AnswerActivity1;
import SA.teacher.manage.ManageActivity1;
import SA.teacher.notice.NoticeActivity1;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.*;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;


public class DailyNext4 extends Activity {
	final String[] classes = new String[] { "1 - A", "1 - B", "2 - A" };
	String dailyInfoStr;
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.daily4_next);

		//////////////Date and class Info TextView//////////////////////
		Intent intent = getIntent();
		dailyInfoStr = intent.getStringExtra("dailyInfo");
		TextView dailyInfo = (TextView) findViewById(R.id.dailyInfo);
		dailyInfo.setText(dailyInfoStr);

		///////////////Save Button//////////////////////////////////////
		/*ImageView saveBtn = (ImageView) findViewById(R.id.savebtn);
		saveBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {

			}
		});*/

		//////////////Round Button//////////////////////////////////////
		ImageView dailyToday = (ImageView) findViewById(R.id.dailytoday);
		dailyToday.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				dailyToday();
			}
		});		
		ImageView dailySpecial = (ImageView) findViewById(R.id.dailyspecial);
		dailySpecial.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				dailySpecial();
			}
		});	
		ImageView dailyHW = (ImageView) findViewById(R.id.dailyhw);
		dailyHW.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				dailyHW();
			}
		});		

		//////////////Notice Button////////////////////////////////////
		TextView noticeBtn = (TextView) findViewById(R.id.notice);
		noticeBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				noticeActivity();
			}
		});
		//////////////Main Button//////////////////////////////////////
		ImageView mainBtn = (ImageView) findViewById(R.id.mainBtn);
		mainBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				mainActivity();
			}
		});
		ImageView manageBtn = (ImageView) findViewById(R.id.manageBtn);
		manageBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				manageActivity();
			}
		});
		ImageView dailyBtn = (ImageView) findViewById(R.id.dailyBtn);
		dailyBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				dailyActivity();
			}
		});
		ImageView answerBtn = (ImageView) findViewById(R.id.answerBtn);
		answerBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				answerActivity();	
			}
		});

	}

	//////////////Round Button//////////////////////////////////////
	void dailyToday(){
		Intent intent = new Intent(this, DailyToday2.class);
		intent.putExtra("dailyInfo",dailyInfoStr);
		startActivity(intent);
	}
	void dailySpecial(){
		Intent intent = new Intent(this, DailySpecial3.class);
		intent.putExtra("dailyInfo",dailyInfoStr);
		startActivity(intent);
	}
	void dailyHW(){
		Intent intent = new Intent(this, DailyHW5.class);
		intent.putExtra("dailyInfo",dailyInfoStr);
		startActivity(intent);
	}

	//////////////Notice Button////////////////////////////////////
	void noticeActivity() {
		Intent intent = new Intent(this, NoticeActivity1.class);
		startActivity(intent);
	}
	//////////////Main Button//////////////////////////////////////
	void mainActivity() {
		Intent intent = new Intent(this, MainActivity.class);
		startActivity(intent);
	}
	void manageActivity() {
		new AlertDialog.Builder(DailyNext4.this)
		.setTitle("���� �������ּ���.")
		.setItems(classes, new DialogInterface.OnClickListener() {

			public void onClick(DialogInterface dialog,	int which) {
				Intent intent = new Intent(DailyNext4.this, ManageActivity1.class);
				intent.putExtra("classname",classes[which]);
				startActivity(intent);
			}
		}).show();
	}
	void dailyActivity() {
		Intent intent = new Intent(this, DailyActivity1.class);
		startActivity(intent);
	}
	void answerActivity() {
		Intent intent = new Intent(this, AnswerActivity1.class);
		startActivity(intent);
	}

}